package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.StationEntity;
import com.my12306.train.model.vo.StationVo;
import com.my12306.user.model.vo.StationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 车站基本信息表
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface StationDao extends BaseMapper<StationEntity> {

    /**
     * 查询所有车站信息
     * @param logicDelete
     * @return
     */
    List<StationEntity> selectStationList(@Param("logicDelete") int logicDelete);

    List<StationVO> findAllByPage(@Param("pageVo")PageVo pageVo, @Param("logicDelete")int logicDelete);

    int countByNotDelete(@Param("logicDelete")int logicDelete);

    int countByNotDeleteByPage(@Param("logicDelete")int logicDelete, @Param("pageVo")PageVo pageVo);

    void insertStationEntity(@Param("station")StationEntity stationEntity);

    void updateByStation(@Param("station")StationEntity stationEntity);
}
